local skel = fk.CreateSkill {
  name = "efengqi__zhujiu",
}

Fk:loadTranslationTable{
  ["efengqi__zhujiu"] = "煮酒",
  [":efengqi__zhujiu"] = "回合开始时，你可以弃置任意张♣牌，令等量名体力为1的角色各回复1点体力。",

  ["#efengqi__zhujiu"] = "煮酒：你可以弃置任意张♣牌，令等量名体力为1的角色各回复1点体力",

  ["$efengqi__zhujiu1"] = "天下风云几多事，青梅煮酒论英雄。",
  ["$efengqi__zhujiu2"] = "玄德久历四方，可识天下英雄？"
}

skel:addEffect(fk.TurnStart, {
  anim_type = "support",
  can_trigger = function (self, event, target, player, data)
    if target == player and player:hasSkill(skel.name) then
      return not player:isNude() and table.find(player.room.alive_players, function (p) return p.hp == 1 end)
    end
  end,
  on_cost = function (self, event, target, player, data)
    local _,dat = player.room:askToUseActiveSkill(player, { skill_name = "efengqi__zhujiu_active", prompt =  "#efengqi__zhujiu" })
    if dat then
      player.room:sortByAction(dat.targets)
      event:setCostData(self, {tos = dat.targets, cards = dat.cards})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:throwCard(event:getCostData(self).cards, skel.name, player, player)
    for _, to in ipairs(event:getCostData(self).tos) do
      if not to.dead then
        room:recover { num = 1, skillName = skel.name, who = to, recoverBy = player }
      end
    end
  end,
})



return skel
